package com.ambulance.project.biz.controller.bigweb;

import com.ambulance.framework.web.domain.AjaxResult;
import com.ambulance.project.biz.dto.web.ReportDto;
import com.ambulance.project.biz.service.MyCustomerService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author RXL
 * @Date 2020/6/9 12:21
 * @Version 1.0
 */
@RestController
@Api(tags = "可视化-患者档案")
@RequestMapping(value = "/web/v1/report", method = RequestMethod.POST)
public class ReportController {

    @Autowired
    private MyCustomerService myCustomerService;

    @ApiOperation(value = "报告", notes = "报告", produces = "application/json")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "dispatchId", value = "调度ID", dataType = "int")
    })
    @ApiResponses({
            @ApiResponse(code = 200, response = ReportDto.class, message = "响应")
    })
    @RequestMapping(value = "/reportList")
    public AjaxResult report(@RequestParam(value = "dispatchId") Integer dispatchId) {
        return AjaxResult.success(myCustomerService.queryOneReport(dispatchId));
    }
}
